import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useAppStore = defineStore('app', () => {
    const count = ref(100)

    function getDoubleCount() {
        return count.value * 2
    }

    function setCount(val: number) {
        count.value = val
    }

    return { count, getDoubleCount, setCount }
}) 